package com.hzit.manager.service.impl;

import com.hzit.manager.mapper.SpecificationOptionMapper;
import com.hzit.manager.service.ISpecificationOptionService;
import com.ruoyi.system.api.domain.SpecificationOption;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 规格选项Service业务层处理
 *
 * @author hbxfwf
 * @date 2024-03-07
 */
@Service
public class SpecificationOptionServiceImpl implements ISpecificationOptionService
{
    @Autowired
    private SpecificationOptionMapper specificationOptionMapper;

    /**
     * 查询规格选项
     *
     * @param id 规格选项主键
     * @return 规格选项
     */
    @Override
    public SpecificationOption selectSpecificationOptionById(Long id)
    {
        return specificationOptionMapper.selectSpecificationOptionById(id);
    }

    /**
     * 查询规格选项列表
     *
     * @param specificationOption 规格选项
     * @return 规格选项
     */
    @Override
    public List<SpecificationOption> selectSpecificationOptionList(SpecificationOption specificationOption)
    {
        return specificationOptionMapper.selectSpecificationOptionList(specificationOption);
    }

    /**
     * 新增规格选项
     *
     * @param specificationOption 规格选项
     * @return 结果
     */
    @Override
    public int insertSpecificationOption(SpecificationOption specificationOption)
    {
        return specificationOptionMapper.insertSpecificationOption(specificationOption);
    }

    /**
     * 修改规格选项
     *
     * @param specificationOption 规格选项
     * @return 结果
     */
    @Override
    public int updateSpecificationOption(SpecificationOption specificationOption)
    {
        return specificationOptionMapper.updateSpecificationOption(specificationOption);
    }

    /**
     * 批量删除规格选项
     *
     * @param ids 需要删除的规格选项主键
     * @return 结果
     */
    @Override
    public int deleteSpecificationOptionByIds(Long[] ids)
    {
        return specificationOptionMapper.deleteSpecificationOptionByIds(ids);
    }

    /**
     * 删除规格选项信息
     *
     * @param id 规格选项主键
     * @return 结果
     */
    @Override
    public int deleteSpecificationOptionById(Long id)
    {
        return specificationOptionMapper.deleteSpecificationOptionById(id);
    }
}
